home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1999 July: Mac OS SDK / Dev.CD Jul 99 SDK1.toast / Development Kits / Mac OS / QuickDraw3D 1.6 SDK / Mac Interfaces / AIncludes / RAVESystem.a < prev   
Encoding:
Text File  |  1999-05-18  |  13.7 KB  |  353 lines  |  [TEXT/MPS ]

  1. ;
  2. ;    File:        RAVESystem.a
  3. ;
  4. ;    Contains:    Interfaces needed when building RAVE engines                            
  5. ;
  6. ;    Version:    Technology:    Quickdraw 3D 1.6
  7. ;                Release:    QuickTime 4.0
  8. ;
  9. ;    Copyright:    © 1995-1999 by Apple Computer, Inc., all rights reserved.
  10. ;
  11. ;    Bugs?:        For bug reports, consult the following page on
  12. ;                the World Wide Web:
  13. ;
  14. ;                    http://developer.apple.com/bugreporter/
  15. ;
  16. ;
  17.     IF &TYPE('__RAVESYSTEM__') = 'UNDEFINED' THEN
  18. __RAVESYSTEM__ SET 1
  19.  
  20.     IF &TYPE('__CONDITIONALMACROS__') = 'UNDEFINED' THEN
  21.     include 'ConditionalMacros.a'
  22.     ENDIF
  23.     IF &TYPE('__RAVE__') = 'UNDEFINED' THEN
  24.     include 'RAVE.a'
  25.     ENDIF
  26.  
  27.  
  28.  
  29. ; ************************************************************************************************
  30. ; *
  31. ; * Typedefs of texture/bitmap method functions provided by the drawing engine.
  32. ; *
  33. ; **********************************************************************************************
  34.  
  35. ;  TQAColorTableNew    parameter descriptions 
  36. ;  TQAColorTableType    pixelType            Depth, color space, etc. 
  37. ;  void                    *pixelData            lookup table entries in pixelType format 
  38. ;  long                    transparentIndex    boolean, false means no transparency, true means index 0 is transparent 
  39. ;  TQAColorTable        **newTable            (Out) Newly created TQAColorTable 
  40. ;  TQAColorTableDelete    parameter descriptions 
  41. ;  TQAColorTable        *colorTable        Previously allocated by QAColorTableNew() 
  42. ;  TQATextureNew    parameter descriptions 
  43. ;     unsigned long        flags                Mask of kQATexture_xxx flags 
  44. ;     TQAImagePixelType    pixelType            Depth, color space, etc. 
  45. ;     const TQAImage        images[]            Image(s) for texture 
  46. ;     TQATexture            **newTexture        (Out) Newly created TQATexture, or NULL on error 
  47. ;  TQATextureDetach    parameter descriptions 
  48. ;     TQATexture            *texture            Previously allocated by QATextureNew() 
  49. ;  TQATextureDelete    parameter descriptions 
  50. ;     TQATexture            *texture            Previously allocated by QATextureNew() 
  51. ;  TQATextureBindColorTable    parameter descriptions 
  52. ;     TQATexture            *texture            Previously allocated by QATextureNew() 
  53. ;     TQAColorTable        *colorTable            Previously allocated by QAColorTableNew() 
  54. ;  TQABitmapNew    parameter descriptions 
  55. ;     unsigned long        flags                Mask of kQABitmap_xxx flags 
  56. ;     TQAImagePixelType    pixelType            Depth, color space, etc. 
  57. ;     const TQAImage        *image                Image 
  58. ;     TQABitmap            **newBitmap            (Out) Newly created TQABitmap, or NULL on error 
  59. ;  TQABitmapDetach    parameter descriptions 
  60. ;     TQABitmap            *bitmap            Previously allocated by QABitmapNew() 
  61. ;  TQABitmapDelete    parameter descriptions 
  62. ;     TQABitmap            *bitmap            Previously allocated by QABitmapNew() 
  63. ;  TQABitmapBindColorTable    parameter descriptions 
  64. ;     TQABitmap            *bitmap            Previously allocated by QABitmapNew() 
  65. ;     TQAColorTable        *colorTable        Previously allocated by QAColorTableNew() 
  66. ; ************************************************************************************************
  67. ; *
  68. ; * Typedefs of private (system-only) functions provided by the drawing engine.
  69. ; *
  70. ; * The TQADrawPrivateNew function returns a TQADrawPrivate *, which points to the
  71. ; * engine-specific private data created for the context. (TQADrawPrivate is a dummy
  72. ; * type which is then cast to the correct engine-specific datatype by the engine code.)
  73. ; *
  74. ; * The TQADrawPrivateDelete function deletes the engine-specific private data.
  75. ; *
  76. ; * TQAStorePrivateNew and TQAStorePrivateDelete provide the same function as QADrawPrivateNew
  77. ; * and TQADrawPrivateDelete, but for the texture and bitmap storage context.
  78. ; *
  79. ; * TQADrawMethodGet and TQAStoreMethodGet are called by the RAVE manager to retrieve
  80. ; * the method pointers for a drawing engine.
  81. ; *
  82. ; * The TQAEngineCheckDevice function returns TRUE if the engine can render to the
  83. ; * indicated GDevice.
  84. ; *
  85. ; **********************************************************************************************
  86.  
  87. ;  TQADrawPrivateNew    parameter descriptions 
  88. ;     TQADrawContext        *newDrawContext        Draw context to initialize 
  89. ;     const TQADevice        *device                Target device 
  90. ;     const TQARect        *rect                Target rectangle (device coordinates) 
  91. ;     const TQAClip        *clip                2D clip region (or NULL) 
  92. ;     unsigned long        flags                Mask of kQAContext_xxx 
  93. ;  TQADrawPrivateDelete    parameter descriptions 
  94. ;     TQADrawPrivate        *drawPrivate        Private context data to delete 
  95. ;  TQAEngineCheckDevice    parameter descriptions 
  96. ;     const TQADevice        *device            Target device 
  97. ;  TQAEngineGestalt    parameter descriptions 
  98. ;     TQAGestaltSelector    selector            Gestalt parameter being requested 
  99. ;     void                *response            Buffer that receives response 
  100.  
  101. ;  new engine methods for RAVE 1.6 
  102. ; ************************************************************************************************
  103. ; *
  104. ; * The TQAEngineMethod union is used to represent a single engine method (it's a
  105. ; * parameter to QAEngineGetMethod). TQAEngineMethodTag identifies which method is being
  106. ; * requested.
  107. ; *
  108. ; **********************************************************************************************
  109.  
  110. TQAEngineMethod            RECORD 0
  111. drawPrivateNew             ds.l    1                ; offset: $0 (0)        ;  Method: Create a private draw context 
  112.                          ORG 0
  113. drawPrivateDelete         ds.l    1                ; offset: $0 (0)        ;  Method: Delete a private draw context 
  114.                          ORG 0
  115. engineCheckDevice         ds.l    1                ; offset: $0 (0)        ;  Method: Check a device for drawing 
  116.                          ORG 0
  117. engineGestalt             ds.l    1                ; offset: $0 (0)        ;  Method: Gestalt 
  118.                          ORG 0
  119. textureNew                 ds.l    1                ; offset: $0 (0)        ;  Method: Create a texture (load is non-blocking) 
  120.                          ORG 0
  121. textureDetach             ds.l    1                ; offset: $0 (0)        ;  Method: Complete load of a texture (blocking) 
  122.                          ORG 0
  123. textureDelete             ds.l    1                ; offset: $0 (0)        ;  Method: Delete a texture 
  124.                          ORG 0
  125. bitmapNew                 ds.l    1                ; offset: $0 (0)        ;  Method: Create a bitmap (load is non-blocking)  
  126.                          ORG 0
  127. bitmapDetach             ds.l    1                ; offset: $0 (0)        ;  Method: Complete load of a bitmap (blocking) 
  128.                          ORG 0
  129. bitmapDelete             ds.l    1                ; offset: $0 (0)        ;  Method: Delete a bitmap 
  130.                          ORG 0
  131. colorTableNew             ds.l    1                ; offset: $0 (0)        ;  Method: Create a new color table 
  132.                          ORG 0
  133. colorTableDelete         ds.l    1                ; offset: $0 (0)        ;  Method: Create a new color table 
  134.                          ORG 0
  135. textureBindColorTable     ds.l    1                ; offset: $0 (0)        ;  Method: Bind a CLUT to a texture 
  136.                          ORG 0
  137. bitmapBindColorTable     ds.l    1                ; offset: $0 (0)        ;  Method: Bind a CLUT to a bitmap 
  138.                          ORG 0
  139. accessTexture             ds.l    1                ; offset: $0 (0)
  140.                          ORG 0
  141. accessTextureEnd         ds.l    1                ; offset: $0 (0)
  142.                          ORG 0
  143. accessBitmap             ds.l    1                ; offset: $0 (0)
  144.                          ORG 0
  145. accessBitmapEnd             ds.l    1                ; offset: $0 (0)
  146. sizeof                     EQU *                    ; size:   $4 (4)
  147.                         ENDR
  148.  
  149. ; typedef long                            TQAEngineMethodTag
  150. kQADrawPrivateNew                EQU        0
  151. kQADrawPrivateDelete            EQU        1
  152. kQAEngineCheckDevice            EQU        2
  153. kQAEngineGestalt                EQU        3
  154. kQATextureNew                    EQU        4
  155. kQATextureDetach                EQU        5
  156. kQATextureDelete                EQU        6
  157. kQABitmapNew                    EQU        7
  158. kQABitmapDetach                    EQU        8
  159. kQABitmapDelete                    EQU        9
  160. kQAColorTableNew                EQU        10
  161. kQAColorTableDelete                EQU        11
  162. kQATextureBindColorTable        EQU        12
  163. kQABitmapBindColorTable            EQU        13
  164. kQAAccessTexture                EQU        14
  165. kQAAccessTextureEnd                EQU        15
  166. kQAAccessBitmap                    EQU        16
  167. kQAAccessBitmapEnd                EQU        17
  168. ; ************************************************************************************************
  169. ; *
  170. ; * QARegisterEngine() registers a new engine. This is called at boot time by the drawing engine
  171. ; * initialization code to register itself with the system. This call takes only one parameter,
  172. ; * the engine's function that allows the manager to request the other methods.
  173. ; *
  174. ; **********************************************************************************************
  175.  
  176. ;  TQAEngineGetMethod    parameter descriptions 
  177. ;     TQAEngineMethodTag        methodTag                Method being requested 
  178. ;     TQAEngineMethod            *method                    (Out) Method 
  179. ;  QARegisterEngine    parameter descriptions 
  180. ;     TQAEngineGetMethod        engineGetMethod        Engine's getMethod method 
  181. ;
  182. ; extern TQAError QARegisterEngine(TQAEngineGetMethod engineGetMethod)
  183. ;
  184.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  185.         IMPORT_CFM_FUNCTION QARegisterEngine
  186.     ENDIF
  187.  
  188.  
  189. ;  QARegisterEngineWithRefCon parameter descriptions 
  190. ;     TQAEngineGetMethod        engineGetMethod        Engine's getMethod method 
  191. ;   long                    refCon                Engine RefCon 
  192. ;
  193. ; extern TQAError QARegisterEngineWithRefCon(TQAEngineGetMethod engineGetMethod, long refCon)
  194. ;
  195.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  196.         IMPORT_CFM_FUNCTION QARegisterEngineWithRefCon
  197.     ENDIF
  198.  
  199. ;  QAGetEngineRefCon parameter descriptions 
  200. ;
  201. ; extern long QAGetCurrentEngineRefCon(void )
  202. ;
  203.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  204.         IMPORT_CFM_FUNCTION QAGetCurrentEngineRefCon
  205.     ENDIF
  206.  
  207.  
  208. ; ************************************************************************************************
  209. ; *
  210. ; * The TQADrawMethod union is used to represent a single draw context method (it's a
  211. ; * parameter to QARegisterDrawMethod). TQADrawMethodTag identifies which method is being
  212. ; * passed.
  213. ; *
  214. ; **********************************************************************************************
  215.  
  216. TQADrawMethod            RECORD 0
  217. setFloat                 ds.l    1                ; offset: $0 (0)        ;  Method: Set a float state variable 
  218.                          ORG 0
  219. setInt                     ds.l    1                ; offset: $0 (0)        ;  Method: Set an unsigned long state variable 
  220.                          ORG 0
  221. setPtr                     ds.l    1                ; offset: $0 (0)        ;  Method: Set an unsigned long state variable 
  222.                          ORG 0
  223. getFloat                 ds.l    1                ; offset: $0 (0)        ;  Method: Get a float state variable 
  224.                          ORG 0
  225. getInt                     ds.l    1                ; offset: $0 (0)        ;  Method: Get an unsigned long state variable 
  226.                          ORG 0
  227. getPtr                     ds.l    1                ; offset: $0 (0)        ;  Method: Get an pointer state variable 
  228.                          ORG 0
  229. drawPoint                 ds.l    1                ; offset: $0 (0)        ;  Method: Draw a point 
  230.                          ORG 0
  231. drawLine                 ds.l    1                ; offset: $0 (0)        ;  Method: Draw a line 
  232.                          ORG 0
  233. drawTriGouraud             ds.l    1                ; offset: $0 (0)        ;  Method: Draw a Gouraud shaded triangle 
  234.                          ORG 0
  235. drawTriTexture             ds.l    1                ; offset: $0 (0)        ;  Method: Draw a texture mapped triangle 
  236.                          ORG 0
  237. drawVGouraud             ds.l    1                ; offset: $0 (0)        ;  Method: Draw Gouraud vertices 
  238.                          ORG 0
  239. drawVTexture             ds.l    1                ; offset: $0 (0)        ;  Method: Draw texture vertices 
  240.                          ORG 0
  241. drawBitmap                 ds.l    1                ; offset: $0 (0)        ;  Method: Draw a bitmap 
  242.                          ORG 0
  243. renderStart                 ds.l    1                ; offset: $0 (0)        ;  Method: Initialize for rendering 
  244.                          ORG 0
  245. renderEnd                 ds.l    1                ; offset: $0 (0)        ;  Method: Complete rendering and display 
  246.                          ORG 0
  247. renderAbort                 ds.l    1                ; offset: $0 (0)        ;  Method: Abort any outstanding rendering (blocking) 
  248.                          ORG 0
  249. flush                     ds.l    1                ; offset: $0 (0)        ;  Method: Start render of any queued commands (non-blocking) 
  250.                          ORG 0
  251. sync                     ds.l    1                ; offset: $0 (0)        ;  Method: Wait for completion of all rendering (blocking) 
  252.                          ORG 0
  253. submitVerticesGouraud     ds.l    1                ; offset: $0 (0)        ;  Method: Submit Gouraud vertices for trimesh 
  254.                          ORG 0
  255. submitVerticesTexture     ds.l    1                ; offset: $0 (0)        ;  Method: Submit Texture vertices for trimesh 
  256.                          ORG 0
  257. drawTriMeshGouraud         ds.l    1                ; offset: $0 (0)        ;  Method: Draw a Gouraud triangle mesh 
  258.                          ORG 0
  259. drawTriMeshTexture         ds.l    1                ; offset: $0 (0)        ;  Method: Draw a Texture triangle mesh 
  260.                          ORG 0
  261. setNoticeMethod             ds.l    1                ; offset: $0 (0)        ;  Method: Set a notice method 
  262.                          ORG 0
  263. getNoticeMethod             ds.l    1                ; offset: $0 (0)        ;  Method: Get a notice method 
  264. ;  new in 1.6 
  265.                          ORG 0
  266. submitMultiTextureParams  ds.l    1                ; offset: $0 (0)        ;  Method: Submit secondary texture params 
  267.                          ORG 0
  268. accessDrawBuffer         ds.l    1                ; offset: $0 (0)
  269.                          ORG 0
  270. accessDrawBufferEnd         ds.l    1                ; offset: $0 (0)
  271.                          ORG 0
  272. accessZBuffer             ds.l    1                ; offset: $0 (0)
  273.                          ORG 0
  274. accessZBufferEnd         ds.l    1                ; offset: $0 (0)
  275.                          ORG 0
  276. clearDrawBuffer             ds.l    1                ; offset: $0 (0)
  277.                          ORG 0
  278. clearZBuffer             ds.l    1                ; offset: $0 (0)
  279.                          ORG 0
  280. textureFromContext         ds.l    1                ; offset: $0 (0)
  281.                          ORG 0
  282. bitmapFromContext         ds.l    1                ; offset: $0 (0)
  283.                          ORG 0
  284. busy                     ds.l    1                ; offset: $0 (0)
  285.                          ORG 0
  286. swapBuffers                 ds.l    1                ; offset: $0 (0)
  287. sizeof                     EQU *                    ; size:   $4 (4)
  288.                         ENDR
  289.  
  290. ; typedef long                            TQADrawMethodTag
  291. kQASetFloat                        EQU        0
  292. kQASetInt                        EQU        1
  293. kQASetPtr                        EQU        2
  294. kQAGetFloat                        EQU        3
  295. kQAGetInt                        EQU        4
  296. kQAGetPtr                        EQU        5
  297. kQADrawPoint                    EQU        6
  298. kQADrawLine                        EQU        7
  299. kQADrawTriGouraud                EQU        8
  300. kQADrawTriTexture                EQU        9
  301. kQADrawVGouraud                    EQU        10
  302. kQADrawVTexture                    EQU        11
  303. kQADrawBitmap                    EQU        12
  304. kQARenderStart                    EQU        13
  305. kQARenderEnd                    EQU        14
  306. kQARenderAbort                    EQU        15
  307. kQAFlush                        EQU        16
  308. kQASync                            EQU        17
  309. kQASubmitVerticesGouraud        EQU        18
  310. kQASubmitVerticesTexture        EQU        19
  311. kQADrawTriMeshGouraud            EQU        20
  312. kQADrawTriMeshTexture            EQU        21
  313. kQASetNoticeMethod                EQU        22
  314. kQAGetNoticeMethod                EQU        23
  315. kQSubmitMultiTextureParams        EQU        24
  316. kQAccessDrawBuffer                EQU        25
  317. kQAccessDrawBufferEnd            EQU        26
  318. kQAccessZBuffer                    EQU        27
  319. kQAccessZBufferEnd                EQU        28
  320. kQClearDrawBuffer                EQU        29
  321. kQClearZBuffer                    EQU        30
  322. kQTextureNewFromDrawContext        EQU        31
  323. kQBitmapNewFromDrawContext        EQU        32
  324. kQBusy                            EQU        33
  325. kQSwapBuffers                    EQU        34
  326. ; ************************************************************************************************
  327. ; *
  328. ; * System call to register a new method for an engine. This is called during the engine's
  329. ; * draw private new functions (to set the initial value of the draw methods), and possibly
  330. ; * at other times when the engine needs to change a draw method.
  331. ; *
  332. ; **********************************************************************************************
  333.  
  334. ;  QARegisterDrawMethod    parameter descriptions 
  335. ;     TQADrawContext            *drawContext            Draw context in which to set method 
  336. ;     TQADrawMethodTag        methodTag                Method to set 
  337. ;     TQADrawMethod            method                    Method 
  338. ;
  339. ; extern TQAError QARegisterDrawMethod(TQADrawContext *drawContext, TQADrawMethodTag methodTag, TQADrawMethod method)
  340. ;
  341.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  342.         IMPORT_CFM_FUNCTION QARegisterDrawMethod
  343.     ENDIF
  344.  
  345.  
  346.  
  347.  
  348.  
  349.  
  350.  
  351.     ENDIF ; __RAVESYSTEM__ 
  352.  
  353.